package com.hhkj.study.admin.config.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.ruoyi.common.core.domain.BizBaseEntity;
import com.ruoyi.common.valid.VAdd;
import com.ruoyi.common.valid.VDisable;
import com.ruoyi.common.valid.VList;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

/**
*
* @author SERVER
* @since 2024-09-06
*/
@TableName(value = "x_config_base")
@EqualsAndHashCode(callSuper = true)
@Data
public class ConfigBase extends BizBaseEntity {

	/**
	 * 参数code
	*/
	private String code;

	/**
	 * 课程类型,字典表id
	 */
	@NotNull(message = "课程类型不能为空", groups = VAdd.class)
	private Long courseType;

	/**
	 * 所在区域,关联x_dict_multi_level表id
	 */
	private String provinceIds;
	/**
	 * 名称
	*/
	private String name;
	/**
	 * json格式数据
	*/
	private String value;

	/**
	 * 禁用标签 0-正常 1-删除
	 */
	@NotNull(message = "禁用标签不能为空", groups = VDisable.class)
	private Integer disableFlag;

	/**
	 * 父id
	 */
	@NotNull(message = "父id不能为空", groups = {VAdd.class, VList.class})
	private Long parentId;

	/**
	 * 额外字段
	 */
	private String extra;
}